Consistency, isolation, and irrevocability in software transactional memory
نویسنده
چکیده
Software transactional memory (STM) is a promising paradigm for the development of concurrent software. It coordinates the potentially conflicting effects of concurrent threads on shared memory by running their critical regions isolated from each other in transactions in an “all-or-nothing” manner. When encountering a conflicting access to shared memory, a conflict resolution strategy decides which transaction has to revert its changes and is restarted. However, this automatic coordination is sometimes too restrictive: non-revertible operations such as I/O operations are disallowed in a transaction and some transactions fail for minor conflicts that could easily be resolved. In addition, most STM schemes focus on shared-memory architectures where costly memory updates impede scalability. This thesis tackles these limitations by exploring extensions to the standard STM schemes. It discusses two novel STM algorithms which broaden the scope for applicability of STM and provide insights into the strength and limitations of transactional programming. Twilight STM proposes to extend STM with non-revertible actions and inconsistency repair. It separates a transaction into a functional transactional phase, and an imperative irrevocable phase, which supports a safe embedding of I/O operations as well as a repair facility to resolve minor conflicts. In contrast to other implementations of irrevocable transactions, twilight code may run concurrently with other transactions including their twilight code without data races. Twilight STM further allows the implementation of application-specific conflict resolution strategies. To analyze their influence on the semantics of the transactions, a formal framework for investigating consistency and isolation properties is developed and applied to different repair operations. Decent STM transfers the STM paradigm to a distributed setting. It is a fully decentralized object-based STM algorithm with versioning. It relies on mostly immutable data structures, which are well-suited for replication and migration. A randomized consensus protocol guarantees consistency of shared memory. Transactions may proceed tentatively before consensus has been reached. Object versioning ensures that transactions read from a consistent memory snapshot, and the consensus protocol determines which transactions can merge in their effects and which transactions need to restart. Hence, delayed communication, e.g. caused by retransmissions in the transport layer, can only affect performance, not consistency. Both STM algorithms have been implemented in functional, object-oriented, and imperative languages, on multi-core and distributed architectures. This comprehensive study points out the need for an enhanced STM interface for more flexibility and higher programming convenience. Benchmarks featuring various workloads show the scalability and competitiveness with state-of-the-art systems.
منابع مشابه
On Parallel Snapshot Isolation and Release/Acquire Consistency
Parallel snapshot isolation (PSI) is a standard transactional consistency model used in databases and distributed systems. We argue that PSI is also a useful formal model for software transactional memory (STM) as it has certain advantages over other consistency models. However, the formal PSI definition is given declaratively by acyclicity axioms, which most programmers find hard to understand...
متن کاملComposability for Application-Specific Transactional Optimizations
Software Transactional Memory (STM) has made great advances towards acceptance into mainstream programming by promising a programming model that greatly reduces the complexity of writing concurrent programs. Unfortunately, the mechanisms in current STM implementations that enforce the fundamental properties of transactions — atomicity, consistency, and isolation — also introduce considerable pe...
متن کاملThread-Level Transactional Memory
This paper presents thread-level transactional memory (TTM), a memory system interface that separates the semantics of transactions—atomicity, consistency, and isolation—from the implementation. By making transactions a thread-level abstraction, TTM permits implementations using different combinations of of high-level software, low-level software, and dedicated hardware. TTM tracks a transactio...
متن کاملStrong Isolation is a Weak Idea ∗ Luke
In the transactional memory (TM) community, much debate has revolved around the choice of strong vs. weak isolation (SI vs. WI) between transactions and conflicting nontransactional accesses. In this position paper we argue that what programmers really want is the natural transactional extension of sequential consistency (SC), and that even SI is insufficient to achieve this. It is widely agree...
متن کاملView Transactions and the Relaxation of Consistency Checks in Software Transactional Memory
We present view transactions, a model for relaxed consistency checks in software transactional memory (STM). View transactions always operate on a consistent snapshot of memory but may commit in a different snapshot. They are therefore simpler to reason about, provide opacity and maintain composability. In addition, view transactions avoid many of the overheads associated with previous approach...
متن کامل